package com.jintu.portal.repository.mysql.dao;

import com.jintu.portal.repository.mysql.mapper.SysConfigMapper;
import com.jintu.portal.pojo.entity.mysql.SysConfig;
import com.jintu.portal.pojo.exception.DaoException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author very
 */
@Slf4j
@Repository("sysConfigDao")
public class SysConfigDao {

    @Resource
    private SysConfigMapper sysConfigMapper;

    public List<SysConfig> queryAllSysConfig() throws DaoException {
        try {
            return sysConfigMapper.queryAllSysConfig();
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            throw new DaoException(e.getMessage());
        }
    }
}
